Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add swift-testing support to the xctest runner #2554

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

ed-irl
Copy link

@ed-irl ed-irl commented Oct 10, 2024

This adds support for swift-testing tests by checking for both the swift testing output as well as the normal xctest output.

@ed-irl
Copy link
Author

ed-irl commented Dec 21, 2024

@aaronsky FYI I'm not able to merge (Github says "Only those with write access to this repository can merge pull requests"). If someone with write access wants to hit the merge button that'd be sweet :).

@aaronsky
Copy link
Contributor

Just waiting on one more review. Thank you for your patience 🙏🏼

test_target_execution_count=$(grep -e "Executed [[:digit:]]\{1,\} tests*," "$testlog" | tail -n1)
if echo "$test_target_execution_count" | grep -q -e "Executed 0 tests, with 0 failures"; then
xctest_target_execution_count=$(grep -e "Executed [[:digit:]]\{1,\} tests*," "$testlog" | tail -n1)
swift_testing_target_execution_count=$(grep -e "Test run with [[:digit:]]\{1,\} test" "$testlog" | tail -n1 || true)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
swift_testing_target_execution_count=$(grep -e "Test run with [[:digit:]]\{1,\} test" "$testlog" | tail -n1 || true)
swift_testing_target_execution_count=$(grep -e "Test run with [[:digit:]]\{1,\} tests" "$testlog" | tail -n1 || true)

no_tests_ran=true
fi

if echo "$xctest_target_execution_count" | grep -q -e "Executed 0 tests, with 0 failures" && \

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can it be the case that only Testing targets ran with zero tests?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants